package net.zhengxinyun.performance.mapper.Indicators;

import net.zhengxinyun.performance.entity.SixIndicatorsEntity;
import net.zhengxinyun.performance.entity.SixIndicatorsEntity;
import net.zhengxinyun.performance.entity.TownIndicatorsEntity;
import net.zhengxinyun.performance.filter.IndexFilter;
import net.zhengxinyun.performance.filter.SixIndicatorsFilter;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface SixIndicatorsEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_six_indicators
     *
     * @mbg.generated Tue Nov 27 20:47:09 CST 2018
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_six_indicators
     *
     * @mbg.generated Tue Nov 27 20:47:09 CST 2018
     */
    int insert(SixIndicatorsEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_six_indicators
     *
     * @mbg.generated Tue Nov 27 20:47:09 CST 2018
     */
    int insertSelective(SixIndicatorsEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_six_indicators
     *
     * @mbg.generated Tue Nov 27 20:47:09 CST 2018
     */
    SixIndicatorsEntity selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_six_indicators
     *
     * @mbg.generated Tue Nov 27 20:47:09 CST 2018
     */
    int updateByPrimaryKeySelective(SixIndicatorsEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_six_indicators
     *
     * @mbg.generated Tue Nov 27 20:47:09 CST 2018
     */
    int updateByPrimaryKey(SixIndicatorsEntity record);

    List<SixIndicatorsFilter> query(SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 获取总数据量
     * @param sixIndicatorsFilter
     * @return
     */
    Integer queryForCount(SixIndicatorsFilter sixIndicatorsFilter);

    int getAuditCount(SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 根据id获取对象
     * @param id
     * @return
     */
//    SixIndicatorsFilter queryById(Long id);

    /**
     * 根据指标名和年份获取对应id
     * @param sixIndicatorsEntity
     * @return
     */
    String queryIdBySuperName(SixIndicatorsEntity sixIndicatorsEntity);

    SixIndicatorsFilter queryByNameAndTime(SixIndicatorsEntity sixIndicatorsEntity);

    /**
     * 把指标表，乡镇表，得分表关联查询。
     * @param sixIndicatorsFilter
     * @return
     */
    List<SixIndicatorsFilter> queryScoreByIndexId(SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 求上个方法对应的总数据条数
     * @param sixIndicatorsFilter
     * @return
     */
    Integer getThreeTableCount(SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 为了批量审核通过查询做的
     * @param sixIndicatorsFilter
     * @return
     */
    List<SixIndicatorsFilter> queryForPass(SixIndicatorsFilter sixIndicatorsFilter);

    List<SixIndicatorsFilter> queryScoreForAudit(SixIndicatorsFilter sixIndicatorsFilter);

    Integer queryNullFinal(SixIndicatorsEntity sixIndicatorsEntity);

    Double queryFirstFinalScore(SixIndicatorsEntity sixIndicatorsEntity);

    List<SixIndicatorsFilter> indexSix(IndexFilter indexFilter);
}